package com.atguigu.spzx.cloud.user.feign;

import com.atguigu.spzx.cloud.order.entity.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * projectName: com.atguigu.spzx.cloud.user.feigns
 *
 * @author: 顾司羽
 * description: 声明式远程调用
 * @return path prefix to be used by all method-level mappings.
 * String path() default "";
 */

//@RequestMapping("/api/order") 会报错
@FeignClient(value = "spzx-cloud-order", path = "/api/order")
public interface OrderFeignClient {

/*    @GetMapping("/findOrderListByUserId")
    List<Order> findOrderList(@RequestParam Long userId);

//    @GetMapping("/api/order/findOrderByOrderId/{userId}")
//    List<Order> findOrderList1(@RequestParam Long userId);*/

    //    @GetMapping("/api/order/findOrderListByUserId")
    @GetMapping("/findOrderListByUserId")
    public List<Order> findOrderList(@RequestParam Long userId);
}
